﻿<!DOCTYPE html>
<html>
<head>
<title>WWM</title>

<link rel="stylesheet" type="text/css" href="/web-eng-wwm/style.css">
<link rel="stylesheet" type="text/css" href="/web-eng-wwm/phpBB3/styles/wwmstyle/theme/general.css"   media="screen, projection" />
<link rel="shortcut icon" type="image/x-icon" href="/web-eng-wwm/bilder/favicon.ico">
<meta charset="UTF-8"/>
</head>

<body>

<div id="page">
        <div id="wrapper">

                <div id="header">
                        <div id="logocontainer">

                                <h1 class="invisible">Wer wird Millionär - WebProjekt</h1>

                                        <div id="topnav">
                                                <?php //Dieser Bereich wird von phpBB ignoriert

                                                include_once("startup.php");
                                                if (isset($_SESSION["user"])){
                                                  echo  '<form method="post" action="" class="headerspace">
                                                            <fieldset class="quick-login">
                                                                <a href="/web-eng-wwm/phpBB3/ucp.php?mode=logout&amp;sid='.phpBBSessionID().'">Abmelden [ '.$_SESSION["user"]->getNickname().' ]</a>
                                                            </fieldset>
                                                         </form>';
                                                }else{
                                                  echo  '<form method="post" action="/web-eng-wwm/phpBB3/ucp.php?mode=login&amp;sid='.phpBBSessionID().'" class="headerspace">
                                                            <fieldset class="quick-login">
                                                                    <label for="username">Name:</label>&nbsp;<input type="text" name="username" id="username" size="10" title="Benutzername" />
                                                                    <label for="password">Passwort:</label>&nbsp;<input type="password" name="password" id="password" size="10" title="Passwort" />

                                                                    <input type="submit" name="login" value="Login" />
                                                                                                                                <a href="/web-eng-wwm/phpBB3/ucp.php?mode=register">Registrieren</a>
                                                            </fieldset>
                                                            <input type="hidden" name="redirect" value="web-eng-wwm/index.php" />
                                                        </form> ';
                                                }


                                                //Nun kommt der Part für phpBB
                                                ob_start();      //Im Fall, dass diese Seite von jemand anderem als phpBB aufgerufen wird,
                                                                 //fängt diese Funktion den folgenden HTML-CODE ein.
                                                ?>
                                                <form action="/web-eng-wwm/phpBB3/ucp.php?mode=login" method="post" class="headerspace">
                                                    <fieldset class="quick-login">
                                                            <!-- IF not S_USER_LOGGED_IN -->
                                                        <label for="username">Name:</label>
                                                        <input type="text" name="username" id="username" size="10" title="Name" />
                                                        <label for="password">Passwort:</label>
                                                        <input type="password" name="password" id="password" size="10" title="Passwort" />
                                                        <input type="submit" name="login" value="Login" />
                                                            <a href="/web-eng-wwm/phpBB3/ucp.php?mode=register">Registrieren</a>
                                                        <!-- ENDIF -->
                                                            <!-- IF S_USER_LOGGED_IN -->
                                                                        <a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a>
                                                                <!-- ENDIF -->
                                                    </fieldset>
                                                    <input type="hidden" name="redirect" value="web-eng-wwm/index.php" />
                                                </form>

                                                <?php
                                                ob_end_clean(); //Im Fall für non-phpBB wird die phpBB-Ausgabe weg geworfen
                                                ?>

                                        </div>
                        </div>

                        <ul id="mainnav">
						<h1 class="invisible">Navigation:</h1>
                                <?php

                                //Dieses Switch Case sorgt auf allen nicht-phpBB Seiten dafür, das der richtige Button
                                //in der NavLeiste selektiert wird. Auf phpBB Seiten wird dieser Code ignoriert.

                                $fileName = basename ( $_SERVER["PHP_SELF"] );
                                switch ($fileName) {
									case "index.php":
										echo  '<li class="selected"><a href="/web-eng-wwm/index.php">Spiel</a></li>
								              <li><a href="/web-eng-wwm/stats.php">Stats</a></li>
										      <li><a href="/web-eng-wwm/phpBB3/index.php">Forum</a></li>';
											  	if (isset($_SESSION['user']))
												{	
												if (($_SESSION['user']->getRole()=='admin'))
													{
														echo '
																<li><a href="/web-eng-wwm/admin.php">Admin</a>
																	<ul>
																		<li><a href="/web-eng-wwm/newquestion.php">Neue Frage hinzufügen</a></li>
																		<li><a href="/web-eng-wwm/changequestion.php">Bestehende Frage anpassen</a></li>
																		<li><a href="/web-eng-wwm/newcategory.php">Neue Kategorie hinzufügen</a></li>
																		<li><a href="/web-eng-wwm/changecategory.php">Bestehende Kategorie anpassen</a></li>
																		<li><a href="/web-eng-wwm/resultnames.php">Gewinnstufen anpassen</a></li>
																		<li><a href="/web-eng-wwm/jokerpossibilities.php">Jokerwahrscheinlichkeiten anpassen</a></li>
																		<li><a href="/web-eng-wwm/manageadmins.php">Administratoren verwalten</a></li>																		
																	</ul>
																</li>
															' ;
													}
												}
									    break;
									case "stats.php":
										echo  '<li><a href="/web-eng-wwm/index.php">Spiel</a></li>
										      <li class="selected"><a href="/web-eng-wwm/stats.php">Stats</a></li>
										      <li><a href="/web-eng-wwm/phpBB3/index.php">Forum</a></li>';
											  	if (isset($_SESSION['user']))
												{	
												if (($_SESSION['user']->getRole()=='admin'))
													{
														echo '
																<li><a href="/web-eng-wwm/admin.php">Admin</a>
																	<ul>
																		<li><a href="/web-eng-wwm/newquestion.php">Neue Frage hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changequestion.php">Bestehende Frage anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/newcategory.php">Neue Kategorie hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changecategory.php">Bestehende Kategorie anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/resultnames.php">Gewinnstufen anpassen</a></li>
																		<li><a href="/web-eng-wwm/jokerpossibilities.php">Jokerwahrscheinlichkeiten anpassen</a></li>
																		<li><a href="/web-eng-wwm/manageadmins.php">Administratoren verwalten</a></li>		
																	</ul>
																</li>
															';
													}
												}
									    break;
										
									case "admin.php":
										echo  '<li><a href="/web-eng-wwm/index.php">Spiel</a></li>
										      <li><a href="/web-eng-wwm/stats.php">Stats</a></li>
										      <li><a href="/web-eng-wwm/phpBB3/index.php">Forum</a></li>';
												if (isset($_SESSION['user']))
												{	
												if (($_SESSION['user']->getRole()=='admin'))
													{
														echo '
																<li class="selected"><a href="/web-eng-wwm/admin.php">Admin</a>
																	<ul>
																		<li><a href="/web-eng-wwm/newquestion.php">Neue Frage hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changequestion.php">Bestehende Frage anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/newcategory.php">Neue Kategorie hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changecategory.php">Bestehende Kategorie anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/resultnames.php">Gewinnstufen anpassen</a></li>
																		<li><a href="/web-eng-wwm/jokerpossibilities.php">Jokerwahrscheinlichkeiten anpassen</a></li>
																		<li><a href="/web-eng-wwm/manageadmins.php">Administratoren verwalten</a></li>		
																	</ul>
																</li>
															';
													}
												}
									    break;
										
										case "newquestion.php":
										echo  '<li><a href="/web-eng-wwm/index.php">Spiel</a></li>
										      <li><a href="/web-eng-wwm/stats.php">Stats</a></li>
										      <li><a href="/web-eng-wwm/phpBB3/index.php">Forum</a></li>';
												if (isset($_SESSION['user']))
												{	
												if (($_SESSION['user']->getRole()=='admin'))
													{
														echo '
																<li class="selected"><a href="/web-eng-wwm/admin.php">Admin</a>
																	<ul>
																		<li><a href="/web-eng-wwm/newquestion.php">Neue Frage hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changequestion.php">Bestehende Frage anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/newcategory.php">Neue Kategorie hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changecategory.php">Bestehende Kategorie anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/resultnames.php">Gewinnstufen anpassen</a></li>
																		<li><a href="/web-eng-wwm/jokerpossibilities.php">Jokerwahrscheinlichkeiten anpassen</a></li>
																		<li><a href="/web-eng-wwm/manageadmins.php">Administratoren verwalten</a></li>		
																	</ul>
																</li>
															';
													}
												}
									    break;
										
										case "changequestion.php":
										echo  '<li><a href="/web-eng-wwm/index.php">Spiel</a></li>
										      <li><a href="/web-eng-wwm/stats.php">Stats</a></li>
										      <li><a href="/web-eng-wwm/phpBB3/index.php">Forum</a></li>';
												if (isset($_SESSION['user']))
												{	
												if (($_SESSION['user']->getRole()=='admin'))
													{
														echo '
																<li class="selected"><a href="/web-eng-wwm/admin.php">Admin</a>
																	<ul>
																		<li><a href="/web-eng-wwm/newquestion.php">Neue Frage hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changequestion.php">Bestehende Frage anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/newcategory.php">Neue Kategorie hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changecategory.php">Bestehende Kategorie anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/resultnames.php">Gewinnstufen anpassen</a></li>
																		<li><a href="/web-eng-wwm/jokerpossibilities.php">Jokerwahrscheinlichkeiten anpassen</a></li>
																		<li><a href="/web-eng-wwm/manageadmins.php">Administratoren verwalten</a></li>		
																	</ul>
																</li>
															';
													}
												}
									    break;
										
										case "newcategory.php":
										echo  '<li><a href="/web-eng-wwm/index.php">Spiel</a></li>
										      <li><a href="/web-eng-wwm/stats.php">Stats</a></li>
										      <li><a href="/web-eng-wwm/phpBB3/index.php">Forum</a></li>';
												if (isset($_SESSION['user']))
												{	
												if (($_SESSION['user']->getRole()=='admin'))
													{
														echo '
																<li class="selected"><a href="/web-eng-wwm/admin.php">Admin</a>
																	<ul>
																		<li><a href="/web-eng-wwm/newquestion.php">Neue Frage hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changequestion.php">Bestehende Frage anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/newcategory.php">Neue Kategorie hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changecategory.php">Bestehende Kategorie anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/resultnames.php">Gewinnstufen anpassen</a></li>
																		<li><a href="/web-eng-wwm/jokerpossibilities.php">Jokerwahrscheinlichkeiten anpassen</a></li>
																		<li><a href="/web-eng-wwm/manageadmins.php">Administratoren verwalten</a></li>		
																	</ul>
																</li>
															';
													}
												}
									    break;
										
										case "changecategory.php":
										echo  '<li><a href="/web-eng-wwm/index.php">Spiel</a></li>
										      <li><a href="/web-eng-wwm/stats.php">Stats</a></li>
										      <li><a href="/web-eng-wwm/phpBB3/index.php">Forum</a></li>';
												if (isset($_SESSION['user']))
												{	
												if (($_SESSION['user']->getRole()=='admin'))
													{
														echo '
																<li class="selected"><a href="/web-eng-wwm/admin.php">Admin</a>
																	<ul>
																		<li><a href="/web-eng-wwm/newquestion.php">Neue Frage hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changequestion.php">Bestehende Frage anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/newcategory.php">Neue Kategorie hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changecategory.php">Bestehende Kategorie anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/resultnames.php">Gewinnstufen anpassen</a></li>
																		<li><a href="/web-eng-wwm/jokerpossibilities.php">Jokerwahrscheinlichkeiten anpassen</a></li>
																		<li><a href="/web-eng-wwm/manageadmins.php">Administratoren verwalten</a></li>		
																	</ul>
																</li>
															';
													}
												}
									    break;
										
										case "resultnames.php":
										echo  '<li><a href="/web-eng-wwm/index.php">Spiel</a></li>
										      <li><a href="/web-eng-wwm/stats.php">Stats</a></li>
										      <li><a href="/web-eng-wwm/phpBB3/index.php">Forum</a></li>';
												if (isset($_SESSION['user']))
												{	
												if (($_SESSION['user']->getRole()=='admin'))
													{
														echo '
																<li class="selected"><a href="/web-eng-wwm/admin.php">Admin</a>
																	<ul>
																		<li><a href="/web-eng-wwm/newquestion.php">Neue Frage hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changequestion.php">Bestehende Frage anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/newcategory.php">Neue Kategorie hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changecategory.php">Bestehende Kategorie anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/resultnames.php">Gewinnstufen anpassen</a></li>
																		<li><a href="/web-eng-wwm/jokerpossibilities.php">Jokerwahrscheinlichkeiten anpassen</a></li>
																		<li><a href="/web-eng-wwm/manageadmins.php">Administratoren verwalten</a></li>		
																	</ul>
																</li>
															';
													}
												}
									    break;
										
										case "jokerpossibilities.php":
										echo  '<li><a href="/web-eng-wwm/index.php">Spiel</a></li>
										      <li><a href="/web-eng-wwm/stats.php">Stats</a></li>
										      <li><a href="/web-eng-wwm/phpBB3/index.php">Forum</a></li>';
												if (isset($_SESSION['user']))
												{	
												if (($_SESSION['user']->getRole()=='admin'))
													{
														echo '
																<li class="selected"><a href="/web-eng-wwm/admin.php">Admin</a>
																	<ul>
																		<li><a href="/web-eng-wwm/newquestion.php">Neue Frage hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changequestion.php">Bestehende Frage anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/newcategory.php">Neue Kategorie hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changecategory.php">Bestehende Kategorie anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/resultnames.php">Gewinnstufen anpassen</a></li>
																		<li><a href="/web-eng-wwm/jokerpossibilities.php">Jokerwahrscheinlichkeiten anpassen</a></li>
																		<li><a href="/web-eng-wwm/manageadmins.php">Administratoren verwalten</a></li>		
																	</ul>
																</li>
															';
													}
												}
									    break;
										
										case "manageadmins.php":
										echo  '<li><a href="/web-eng-wwm/index.php">Spiel</a></li>
										      <li><a href="/web-eng-wwm/stats.php">Stats</a></li>
										      <li><a href="/web-eng-wwm/phpBB3/index.php">Forum</a></li>';
												if (isset($_SESSION['user']))
												{	
												if (($_SESSION['user']->getRole()=='admin'))
													{
														echo '
																<li class="selected"><a href="/web-eng-wwm/admin.php">Admin</a>
																	<ul>
																		<li><a href="/web-eng-wwm/newquestion.php">Neue Frage hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changequestion.php">Bestehende Frage anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/newcategory.php">Neue Kategorie hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changecategory.php">Bestehende Kategorie anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/resultnames.php">Gewinnstufen anpassen</a></li>
																		<li><a href="/web-eng-wwm/jokerpossibilities.php">Jokerwahrscheinlichkeiten anpassen</a></li>
																		<li><a href="/web-eng-wwm/manageadmins.php">Administratoren verwalten</a></li>		
																	</ul>
																</li>
															';
													}
												}
									    break;
										
									default:
										echo  '<li><a href="/web-eng-wwm/index.php">Spiel</a></li>
                                              <li><a href="/web-eng-wwm/stats.php">Stats</a></li>
                                              <li><a href="/web-eng-wwm/phpBB3/index.php">Forum</a></li>';
											if (isset($_SESSION['user']))
											{	
												if (($_SESSION['user']->getRole()=='admin'))
													{
														echo '
																<li><a href="/web-eng-wwm/admin.php">Admin</a>
																	<ul>
																		<li><a href="/web-eng-wwm/newquestion.php">Neue Frage hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changequestion.php">Bestehende Frage anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/newcategory.php">Neue Kategorie hinzufügen</a></li>
                                                                        <li><a href="/web-eng-wwm/changecategory.php">Bestehende Kategorie anpassen</a></li>
                                                                        <li><a href="/web-eng-wwm/resultnames.php">Gewinnstufen anpassen</a></li>
																		<li><a href="/web-eng-wwm/jokerpossibilities.php">Jokerwahrscheinlichkeiten anpassen</a></li>
																		<li><a href="/web-eng-wwm/manageadmins.php">Administratoren verwalten</a></li>	
																	</ul>
																</li>
															';
													}
											}
											  
										break;
                                }

                                //Im Fall, dass diese Seite von jemand anderem als phpBB aufgerufen wird,
                                //fängt diese Funktion den folgenden HTML-CODE ein.
                                ob_start();

                                ?>
								
                                <li><a href="/web-eng-wwm/index.php">Spiel</a></li>
                                <li><a href="/web-eng-wwm/stats.php">Stats</a></li>
                                <li class="selected"><a href="/web-eng-wwm/phpBB3/index.php">Forum</a></li>

									<!-- IF U_ACP -->
									<li><a href="/web-eng-wwm/admin.php">Admin</a>
										<ul>
											<li><a href="/web-eng-wwm/newquestion.php">Neue Frage hinzufügen</a></li>
                                            <li><a href="/web-eng-wwm/changequestion.php">Bestehende Frage anpassen</a></li>
                                            <li><a href="/web-eng-wwm/newcategory.php">Neue Kategorie hinzufügen</a></li>
                                            <li><a href="/web-eng-wwm/changecategory.php">Bestehende Kategorie anpassen</a></li>
                                            <li><a href="/web-eng-wwm/resultnames.php">Gewinnstufen anpassen</a></li>       
											<li><a href="/web-eng-wwm/jokerpossibilities.php">Jokerwahrscheinlichkeiten anpassen</a></li>
											<li><a href="/web-eng-wwm/manageadmins.php">Administratoren verwalten</a></li>													
										</ul>
									</li>
									<!-- ENDIF -->
															
                                <?php
									//Im Fall für non-phpBB wird die phpBB-Ausgabe weg geworfen
									//Dies betrifft den Code zwischen den "ob" Funktionen.
									ob_end_clean();				
								?>
                        </ul>

                </div>

<div id="content">